package login;

import java.util.ArrayList;
import java.util.List;

public class Login {

	public static boolean authenticate(String username, String password) {
        // hardcoded username and password
		
		List<String> users = new ArrayList<String>();
		
		List<String> passwords = new ArrayList<String>();
		users.add("admin");
		passwords.add("admin");
		
		users.add("juan");
		passwords.add("1234");
		
		users.add("user");
		passwords.add("user");
		
		int index =users.lastIndexOf(username); 
		
        if ( index != -1 && passwords.get(index).equals(password )) {
            return true;
        }
        return false;
    }
}
